<?php
/**
 *  💡 免责声明：本软件不得用于商业用途，仅做学习交流
 *  ⚠️ 权利声明：本软件由版权人提供产品技术支持
 *  📅 项目编号：NX2025-0135
 */
namespace App\Api\Controllers\Auths;

use App\Api\BaseApi;
use App\Service\Im\ImService;

class ImApi extends BaseApi
{
    public function registerIm() //获取客服Im数据
    {
        $server = ImService::make();
        $userModel = self::UserModel();
        $res = [
            'to_uuid' => $server->getCustomerService(),
            'apiurl' => env('IM_URL'),
            'username' => $userModel->telephone,
            'password' => $server->register($userModel->telephone, 0, 0),
        ];
        return responses($res);
    }
}
